An operating system is a set of computer code that performs a variety of functions, including interacting with the computer hardware; insulating the programmer from the specifics of the computer hardware; and providing general functionality that many application programs require.
An application, in contrast, addresses a particular problem to be solved. Examples of applications software are word processors, etc. An application and operating system communicate using a series of standardized instruction codes passed between the two. The operating system software interprets these standardized instruction codes, and controls the computer's hardware resources in response thereto. Oftentimes, information in the form of data or messages is passed back to the applications software.
Typically, when a user instructs the operating system to shut down the computer in which applications and operating system are running, it takes a relatively long time to shut down. For example, the operating system may ask an application to exit itself which may take a long time. Alternatively, the operating system may prompt the user to manually terminate the application, which sometimes requires too much user interaction.